package jvm.gc;

import java.lang.ref.SoftReference;

/**
 * todo
 *
 * @author: luolidong
 * @create: 2021-07-15 16:53
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {

        String a1= "aa"+"bb";
        System.out.println(a1);
        //字符串常量池中没有aabb ,调用intern()，放入常量池，返回该a1实例的引用
        System.out.println(a1.intern()==a1);//true

        Integer a=12345;
        System.out.println(a.toString());
        Byte b1=12;
        Byte b2=new Byte((byte) 12);
        System.out.println(b1==b2);

        Short s1=123;
        Short s2=new Short((short)123);
        System.out.println(s2==s1);


    }
}
